package com.system.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.base.common.persistence.utils.SqlMapper;
import com.system.model.UserInfo;
import com.system.model.UserLoginInfo;
import com.system.service.LoginService;

@Service
public class LoginServiceImpl implements LoginService {
	@Autowired
	SqlMapper sqlMapper;

	public UserLoginInfo getUserLoginInfo(String userName) throws Exception {
		Map<String, String> params = new HashMap<String, String>();
		params.put("userName", userName);
		String sql = "SELECT * from user_login_info t where t.login_name = #{userName}";
		UserLoginInfo user = sqlMapper.selectOne(sql, params,
				UserLoginInfo.class);
		return user;
	}
}
